package com.self.masterwork;

import java.util.Iterator;

/**
 * 作者：tianjiayuan
 * 创建时间：2018-05-31 13:53
 * 类描述：
 * 修改人：
 * 修改时间：
 */
public class KBusChannel extends BusChannel {


    @Override
    public void open() {
        if (consumers == null) {
            System.out.println("error");
        }
        Iterator<String> iterator = consumers.keySet().iterator();
        while (iterator.hasNext()) {
            String key = iterator.next();
            String[] values = this.consumers.get(key);

            for (String value : values) {
                OutBusTransport outBusTransport = new OutBusTransport();
                outBusTransport.transport(key, value);
            }
        }
    }

    @Override
    public void close() {

    }
}
